import { SHOWMOADL, HIDEMODAL } from '../const/modal.const';

const initialState = { show: false };

function modalReducer(state = initialState, action) {
  switch (action.type) {
    case SHOWMOADL:
      return { ...state, show: true };
    case HIDEMODAL:
      return { ...state, show: false };
    default:
      return state;
  }
}

export default modalReducer;
